package src.com.zaizai123;

import java.awt.*;

public class LayoutPracticeByMyselfII {
        public static void main(String[] args) {
            Frame frame = new Frame("布局练习");
            frame.setSize(1500,800);
            frame.setVisible(true);
            //用panel将布局飞为上下两部分
            Frame frameNorth = new Frame();
            Frame frameSouth = new Frame();

            frame.add(frameNorth);
            frame.add(frameSouth);
            frameNorth.setBounds(20,20,1500,400);
            frameNorth.setBackground(new Color(236, 163, 163));
            frame.add(frameNorth,BorderLayout.SOUTH);
            frame.add(frameNorth,BorderLayout.NORTH);

            Button buttonNLeft = new Button();
            Button buttonNRight = new Button();
            Button buttonNUP = new Button();
            Button buttonNDown = new Button();
            frameNorth.add(buttonNLeft,BorderLayout.WEST);
            frameNorth.add(buttonNRight,BorderLayout.EAST);
            frameNorth.add(buttonNUP,BorderLayout.NORTH);
            frameNorth.add(buttonNDown,BorderLayout.SOUTH);





        }


}
